
import axios from "../axios.js";

export default {
    // 新增客户
   async addOrders(params){
        return await axios({
            url: '/orders/addOrders',
            method: 'post',
            data:params
           
        })

    },
    // 获取客户，params是查询的值
   async getOrders(params){
        return await axios({
            url: '/orders/getOrders',
          
            method: 'get',
            params
           
        })

    },
    // by 状态获取
   async getOrdersByState(params){
        return await axios({
            url: '/orders/getOrdersByState',
          
            method: 'get',
            params
           
        })

    },
      // by订单id获取该订单所有信息，正想查询
   async getOrdersByOrdersId(params){
       console.log(params);
    return await axios({
        url: '/orders/getOrdersByOrdersId',
      
        method: 'get',
        params:params
       
    })

},
    // by销售Id匹配所属客户，params是查询的值
   async getOrdersBySaleMenId(params){
        return await axios({
            url: '/orders/getOrdersBySaleMenId',
          
            method: 'get',
            params
           
        })

    },
    // by订单 id 删除该订单
   async delOneOrders(data){
    //    console.log(data);
        return await axios({
            url: '/orders/delOneOrders',
          
            method: 'post',
            data
           
        })

    },

    // 修改订单
    async oneModifyOrders(data){
        return await axios({
            url: '/orders/oneModifyOrders',
          
            method: 'post',
            data
           
        })
    },
    // 修改订单
    async passoutState(data){
        return await axios({
            url: '/orders/passoutState',
          
            method: 'post',
            data
           
        })
    },


    // 退保


    // 申请退保
    async applyOutOrders(data){
        return await axios({
            url: '/orders/applyOutOrders',
          
            method: 'post',
            data
           
        })
    },
    async getOutOrdersBySaleMenId(params){
        return await axios({
            url: '/orders/getOutOrdersBySaleMenId',
          
            method: 'get',
            params
           
        })
    },
    // 获取所有 退货
    async getOutOrders(params){
        return await axios({
            url: '/orders/getOutOrders',
          
            method: 'get',
            params
           
        })
    },
    // 获取所有 退货
    async modifyOutOrdersState(data){
        return await axios({
            url: '/orders/modifyOutOrdersState',
          
            method: 'post',
            data:data
           
        })
    },
   
}